package com.nervenets.web.hibernate.dao;

import com.nervenets.web.enumeration.NewsType;
import com.nervenets.web.hibernate.domain.news.News;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NewsDao extends JpaRepository<News, Long>, JpaSpecificationExecutor<News> {
    List<News> findAllByManagerIdAndType(long managerId, NewsType type);
}
